import { get, post } from './baseRequest';

interface IResponse<T> {
  code: number;
  msg: string;
  data: T;
}

export const loginApi = (params: Record<string, unknown>): Promise<IResponse<unknown>> => post('/user/login', params);

export const uerInfoApi = (params?: Record<string, unknown>): Promise<IResponse<unknown>> =>
  get('/user/userInfo', params);

export const logoutApi = (params?: Record<string, unknown>): Promise<IResponse<unknown>> =>
  post('/user/logout', params);
